package com.blyat.xsoft.gateway.restful.service;

import com.blyat.xsoft.gateway.restful.entity.Authority;
import com.blyat.xsoft.kernel.restful.service.BaseService;
import reactor.core.publisher.Flux;
import reactor.core.publisher.Mono;

import java.util.List;

/**
 * @author syh
 * @date 2019/10/21
 **/
public interface AuthorityService extends BaseService<Authority> {

    /**
     * security 获取所有用户权限（未构建树）
     *
     * @param userId
     * @return
     */
    List<Authority> getByUserId(String userId);

    /**
     * 构造用户权限树
     *
     * @param userId
     * @return
     */
    Flux<Authority> getAuthorityTree(String userId);

}
